home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
BrainRulers
/
Source
/
DragPSView.h
< prev
next >
Wrap
Text File
|
1995-06-12
|
1KB
|
33 lines
// DragPSView.m
// A simple view class that responds to mouseDown event by
// opening a stream and sending a message to a 'streamProvider'
// to draw postscript code into the stream. It then writes the
// stream back to the file (DRAGGEDFILENAME) and invokes the view
// method dragFile:fromRect:slideBack:event:
// You must connect the streamProvider outlet to an object that
// responds to writeToStream: by writing the contents of the file
// represented by the icon to the given stream.
// DragPSView.h provides an interface to a 'streamProvider'
// category (of the Object class) with this method.
// Note: This class does not remove DRAGGEDFILENAME.
// DragPSView composites an image (IMAGENAME) to draw itself.
#import <appkit/View.h>
#define DRAGGEDFILENAME "/tmp/PS_Image.ps"
#define IMAGENAME "smallPSicon"
@interface DragPSView:View
{
// provides the PSstream of image to be dragged
id streamProvider;
}
- drawSelf:(NXRect *)rects :(int)rectCount;
- mouseDown:(NXEvent *)theEvent;
@end
@interface Object(streamProvider)
- writeToStream:(NXStream *)stream;
@end